package com.yoso.shop.application.service;

import com.yoso.base.interfaces.controller.BaseResponse;
import com.yoso.base.service.IBaseService;
import com.yoso.shop.domain.order.OrderEntityExample;
import com.yoso.shop.interfaces.vo.order.OrderVo;

import java.util.List;

/**
 * @author shizejin
 * @date 2022/1/29
 * @description:
 */
public interface IOrderService extends IBaseService<OrderVo, OrderEntityExample> {
    /**
     * 增加订单
     */
    BaseResponse addOrder(List<String> cartIdList);

    /**
     * 取消订单
     */
    BaseResponse cancelOrder(String orderId);

    /**
     * 处理取消订单
     */
    BaseResponse handlerCancelOrder(OrderVo orderVo);

    /**
     * 修改订单信息
     */
    BaseResponse updateOrderInfo(OrderVo vo);

    /**
     * 订单支付确认
     *
     * @param orderId 订单id
     */
    void orderPayConfirm(String orderId);

    /**
     * 获取当前用户订单信息
     *
     * @param username 用户名
     * @return 订单列表
     */
    List<OrderVo> getUserOrder(String username);
}
